package com.chen.Main;

import com.chen.pojo.User;
import com.chen.pojo.UserU;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserUMain {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("Beans.xml");
        UserU userU = (UserU) context.getBean("userU");
        userU.getName();
        System.out.println("======");
        UserU userU1 = (UserU) context.getBean("userU1");
        userU1.getName();
        System.out.println("+++++++");
        UserU userU2 = (UserU) context.getBean("userU2");
        userU2.getName();


    }
}
